
import { reqSearMsg } from "../api/index.js"

const detail = {
	state:{
		// count:1
		// list:JSON.parse(sessionStorage.getItem(`list`)) || {},
		list:{}
	},
	mutations:{
		CETSEARMSG(state,resu){
			state.list=resu
			// console.log(state.list)
		}
	},
	actions:{
		// 获取歌曲详情页的信息
		async getSearMsg({commit}, id){
			let result = await reqSearMsg(id)
			// console.log(result.data.playlist);
			// if(result.code == 200){
				commit('CETSEARMSG',result.data.playlist)
			// }
		}
	},
	getters:{}
}

export default detail